package com.becca.cake.dao.system;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.system.RoleDO;

/**
 * 角色管理Dao层
 * @author hejinguo
 * @version $Id: RolesDAO.java, v 0.1 2013-12-2 下午11:04:07
 */
@Repository
public interface RolesDAO {
    /**
     * 查询所有的角色
     * @return
     * @throws DataAccessException
     */
    List<RoleDO> selectAllRoles() throws DataAccessException;

    /**
     * 角色管理中查询全部角色
     * @author hejinguo 
     * @param map
     * @return
     * @throws Exception
     */
    List<RoleDO> selectAllRoleMessage(Map<String, Object> map) throws DataAccessException;

    /**
     * 角色管理中查询全部角色的总记录数
     * @author hejinguo 
     * @param map
     * @return
     * @throws Exception
     */
    Long selectAllRoleMessageCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 根据ID查询角色信息
     * @author hejinguo 
     * @param roleId
     * @return
     * @throws DataAccessException
     */
    RoleDO selectRoleById(String roleId) throws DataAccessException;

    /**
     * 添加角色信息
     * @author hejinguo
     * @param roleDO
     * @throws Exception
     */
    void insetRole(RoleDO roleDO) throws DataAccessException;

    /**
     * 修改角色信息
     * @author hejinguo
     * @param roleDO
     * @throws DataAccessException
     */
    void updateRole(RoleDO roleDO) throws DataAccessException;

    /**
     * 根据ID删除角色信息
     * @author hejinguo 
     * @param ids
     * @throws Exception
     */
    void deleteRoleById(String ids) throws DataAccessException;

    /**
     * 根据员工ID查询角色信息
     * @author hejinguo 
     * @param adminId
     * @return
     * @throws DataAccessException
     */
    List<RoleDO> selectRoleByAdminId(String adminId) throws DataAccessException;

    /**
     * 根据部门ID查询角色信息
     * @author hejinguo 
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<RoleDO> selectRoleByDeptId(Map<String, Object> map) throws DataAccessException;

    /**
     * 根据部门ID查询角色信息总记录数
     * @author hejinguo 
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectRoleByDeptIdCount(Map<String, Object> map) throws DataAccessException;

}
